<html>
<head><meta charset="utf-8"><title>emacs configuration · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html">emacs configuration</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="184917284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184917284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184917284">(Jan 06 2020 at 15:44)</a>:</h4>
<p>if only to force myself to figure out what the options are for a "good" emacs setup. Up to this point, my experience with RA was with VSCode. (or rather, I started using VSCode just so I could see what RA was supposed to act like.)</p>



<a name="184917766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184917766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184917766">(Jan 06 2020 at 15:49)</a>:</h4>
<p>I don't know anymore what the best emacs setup is currently... probably <code>rustic</code>, though it didn't play well with my spacemacs setup last time I tried. Our custom elisp code has actually mostly been integrated by <code>emacs-lsp</code> now, so the instructions in the repo are at least a bit outdated</p>



<a name="184956497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184956497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184956497">(Jan 06 2020 at 21:07)</a>:</h4>
<p>I eventually gave up on rustic</p>



<a name="184956523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184956523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184956523">(Jan 06 2020 at 21:07)</a>:</h4>
<p>partially because it's just hard for me to get used to emacs modes that get all fancy</p>



<a name="184956538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184956538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184956538">(Jan 06 2020 at 21:08)</a>:</h4>
<p>but also because integration with <code>x.py</code> wasn't as smooth</p>



<a name="184956607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184956607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184956607">(Jan 06 2020 at 21:08)</a>:</h4>
<p>that said, I suspect you could do better than my current setup..it seems to work for <code>M-.</code> though</p>



<a name="184956653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184956653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184956653">(Jan 06 2020 at 21:09)</a>:</h4>
<p>it looks like I <em>am</em> still using <code>ra-emacs-lsp</code> though</p>



<a name="184956662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/184956662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#184956662">(Jan 06 2020 at 21:09)</a>:</h4>
<p>not sure if I need to</p>



<a name="185049041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185049041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185049041">(Jan 07 2020 at 20:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what do you use for completion, if anything?</p>



<a name="185049102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185049102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185049102">(Jan 07 2020 at 20:05)</a>:</h4>
<p>I just installed <code>company-lsp</code> and am playing with it. (It was the first thing providing <code>'lsp</code> that I saw that worked with <code>straight-package.el</code>)</p>



<a name="185049246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185049246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185049246">(Jan 07 2020 at 20:06)</a>:</h4>
<p>Short version of my current status: <code>M-/</code> works (or at least does something useful), but <code>M-.</code> does not yet do anything useful.</p>



<a name="185049306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185049306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185049306">(Jan 07 2020 at 20:07)</a>:</h4>
<p>(I am trying to use <code>ra-emacs-lsp.el</code>in tandem with <code>company.el</code>.)</p>



<a name="185058299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185058299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185058299">(Jan 07 2020 at 21:46)</a>:</h4>
<p>okay gotten a bit further now</p>



<a name="185058313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185058313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185058313">(Jan 07 2020 at 21:46)</a>:</h4>
<p>(my goal is to get far enough to write setup docs for each editor.)</p>



<a name="185091709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185091709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185091709">(Jan 08 2020 at 09:18)</a>:</h4>
<p>TIL about straight-package.el</p>
<blockquote>
<p>(my goal is to get far enough to write setup docs for each editor.)</p>
</blockquote>
<p>Note that vim might be tricky, as there are a lot of different extensions for LSP</p>



<a name="185095703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185095703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185095703">(Jan 08 2020 at 10:17)</a>:</h4>
<p>yeah, straight seems pretty cool (I'm too invested in my spacemacs setup though)</p>



<a name="185095897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185095897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185095897">(Jan 08 2020 at 10:19)</a>:</h4>
<p>one day, we should write emacs, but with wasm instead of elisp inside....</p>



<a name="185124278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185124278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185124278">(Jan 08 2020 at 15:39)</a>:</h4>
<p>Is <code>M-x lsp-goto-type-definition</code> failure a known deficiency of the emacs support? Or do I just not have it configured correctly?</p>



<a name="185124413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185124413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185124413">(Jan 08 2020 at 15:40)</a>:</h4>
<p>it works for me</p>



<a name="185124698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185124698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185124698">(Jan 08 2020 at 15:43)</a>:</h4>
<p><a href="/user_uploads/4715/MPTiSKY_O2vAbi9JQrS-4EY6/gototypedef.gif" target="_blank" title="gototypedef.gif">gototypedef.gif</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/MPTiSKY_O2vAbi9JQrS-4EY6/gototypedef.gif" target="_blank" title="gototypedef.gif"><img src="/user_uploads/4715/MPTiSKY_O2vAbi9JQrS-4EY6/gototypedef.gif"></a></div>



<a name="185124735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185124735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185124735">(Jan 08 2020 at 15:43)</a>:</h4>
<p>works for me as well</p>



<a name="185125361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185125361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185125361">(Jan 08 2020 at 15:48)</a>:</h4>
<p>/me is still working out kinks in his setup</p>



<a name="185125594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185125594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185125594">(Jan 08 2020 at 15:49)</a>:</h4>
<p>Okay it seems to be working for me too. (On the "failing" test, I had switched some things around and accidentally put RLS back in as the lsp-rust-server)</p>



<a name="185125627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/emacs%20configuration/near/185125627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/emacs.20configuration.html#185125627">(Jan 08 2020 at 15:49)</a>:</h4>
<p><span aria-label="laughter tears" class="emoji emoji-1f602" role="img" title="laughter tears">:laughter_tears:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>